from timeit import Timer

import sys


def Problem():
    """The sum of the squares of the first ten natural numbers is,
    1^(2) + 2^(2) + ... + 10^(2) = 385
    
    The square of the sum of the first ten natural numbers is,
    (1 + 2 + ... + 10)^(2) = 55^(2) = 3025
    
    Hence the difference between the sum of the squares of the first 
    ten natural numbers and the square of the sum is 3025 - 385 = 2640.
    
    Find the difference between the sum of the squares of the first one 
    hundred natural numbers and the square of the sum."""

    sumOfSquares = sum([ x*x for x in range(1,101)])
    squaresOfSums = sum(range(1,101))**2

    print "Answer for Problem 6 = %d" % (squaresOfSums - sumOfSquares,)




    
if __name__ == "__main__":
    t = Timer(setup='from __main__ import Problem', stmt='Problem()').timeit(1)
    print "Execution time = %0.3f seconds" %(t,)